<div class="filter2">
    <div class="item f1" style="width: 100px; padding-left: 10px;">
        <input type="text" id="startDate" placeholder="起始日期" data-am-datepicker readonly/>
    </div>
    <div class="item" style="width: 16px; text-align: center"> - </div>
    <div class="item f2" style="width: 100px;">
        <input type="text" id="endDate" placeholder="结束日期" data-am-datepicker readonly/>
    </div>
</div>

<div class="tr">
    <ul class="am-avg-sm-3">
        <li>时间</li>
        <li>笔数</li>
        <li>输赢</li>
    </ul>
</div>

<div class="scroll-data"><div class="for-scroll">
    <table>
    </table>
    <div class="zxf_pagediv">
	</div>
</div></div>

<div class="sum">
    <div class="count">总笔数：<span>0</span></div>
    <div class="win">总输赢：<span>0</span></div>
    <div class="clear"></div>
</div>

<style type="text/css">
    .filter2 {
        height: 49px;
    }
    .filter2 .item {
        display: inline-block;
        line-height: 30px;
        margin: 9px 0px 0px 0px;
    }
    .filter2 input {
        background-color: rgba(0, 0, 0, 0.2);
        line-height: 30px;
        text-align: center;
        padding-top: 0px;
        padding-bottom: 0px;
        border-radius: 3px;
        border: 1px solid rgba(250,250,250,0.44);
        color: #fff;
        font-size: 0.65rem;
        width: 100%;
    }
    .tr {
        height: 35px;
        border-bottom: 1px solid rgba(255,255,255,0.7);
        background-color: rgba(255,255,255,0.4);
    }
    .tr li {
        text-align: center;
        font-size: 0.6rem;
        line-height: 35px;
        color: #3c3c3c;
    }
    .scroll-data table {
        width: 100%;
    }
    .scroll-data table td {
        height: 50px;
        border-bottom: 1px solid rgba(255,255,255,0.7);
        background-color: rgba(255,255,255,0.4);
        vertical-align: middle;
        text-align: center;
        width: 33%;
        font-size: 0.6rem;
    }
    .scroll-data {
        position: absolute;
        left: 0px;
        right: 0px;
        top: 85px;
        bottom: 46px;
        overflow: hidden;
    }
    .scroll-data table .odd td {
        background-color: rgba(255,255,255,0.5);
    }
    .oper-clue {
        text-align: center;
        line-height: 50px;
        font-size: 0.65rem;
        color: #000;
    }
    .sum {
        position: absolute;
        left: 0px;
        right: 0px;
        bottom: 0px;
        height: 45px;
        color: #3c3c3c;
        font-size: 0.6rem;
        background-color: rgba(255,255,255,0.4);
        border-top: 1px solid #fff;
        line-height: 44px;
    }
    .sum .count {
        float: left;
        width: 66%;
        text-align: center;
    }
    .sum .win {
        float: right;
        padding-right: 20px;
    }
    .sum span {
        color: green;
        font-weight: bold;
    }

    input::-webkit-input-placeholder {
        color: rgba(255,255,255,0.5);
    }
　　input:-moz-placeholder {
        color: rgba(255,255,255,0.5);
    }
　　input::-moz-placeholder {
        color: rgba(255,255,255,0.5);
    }
　　input:-ms-input-placeholder { 
        color: rgba(255,255,255,0.5);
    }
</style>

<script>
    $("#center-top .home").hide();
    $("#center-top .back").show();
    $("#center-top .menu").hide();
    
    // 日期
	$("#startDate").datepicker({format: 'yyyy-mm-dd'});
	$("#endDate").datepicker({format: 'yyyy-mm-dd'});

	var _f = Util.queryTemplate($(".scroll-data table"), ".zxf_pagediv", $(".u-btn17"), function(page, size, cb) {
		var s = $("#startDate").val().trim();
		var e = $("#endDate").val().trim();
		startLoading();
		CMD.stat_user_uquery(null, s, e, size, page, function(r) {
			stopLoading();
			cb(r);
		});
    }, function(table, list, sum) {
        if (Util.isEmpty(list)) {
            table.append("<tr><td colspan='3'>暂无数据</tr>");
            return;
        }

        for (var i in list) {
            var d = list[i];
            var tr = $("<tr></tr>");
            if (i % 2 == 1) var tr = $("<tr class='odd'></tr>");
            tr.append("<td>" + d.date + "</td>");
			tr.append("<td class='count' value='" + d.date + "'>" + d.betCount + "</td>");
			tr.append("<td>" + d.betProfit/100 + "</td>");
            table.append(tr);
        }
        _mainScroll.refresh();

        table.find(".count").click(function(e) {
            /*
            if ($(e.currentTarget).html() == '0') return;
            Util.jumpUrl({
                cmd: "bet2",
                date: $(e.currentTarget).attr("value"),
            }); */
        })
    });    
    $(".f1 input").change(_f);
    $(".f2 input").change(_f);

    var _mainScroll;
    $(function() {
        _mainScroll = new IScroll(".scroll-data", {
            scrollX: false,
            scrollY: true,
            click: true,
        })
    });
</script>
